home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16345 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: Wed, 10 Apr 96 13:30:25 GMT
  6. Organization: none
  7. Message-ID: <829143025snz@genesis.demon.co.uk>
  8. References: <JSA.96Feb16135027@organon.com> <4kb2j8$an0@solutions.solon.com> <TYNOR.96Apr9105114@twratl.atlanta.twr.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <TYNOR.96Apr9105114@twratl.atlanta.twr.com>
  15.            tynor@atlanta.twr.com "Steve Tynor" writes:
  16.  
  17. >In article <4kcpgkINNcku@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca (Kazimir
  18. > Kylheku) writes:
  19. >
  20. >| 1.3:  If I write the code
  21. >| 
  22. >|               int i, j;
  23. >|       
  24. >|       can I assume that (&i + 1) == &j?
  25. >| 
  26. >| A:    Only sometimes.  It's not portable, because in EBCDIC, i and j are
  27. >|       not adjacent.
  28. >
  29. >What does this have to do with EBCDIC? i and j in this examples are
  30. >just identifier names of variables -- &i is the address of the
  31. >variable i. I has nothing whatsoever to do with the EBCDIC (or ASCII
  32. >or whatever character set you choose) value of the characters 'i' and
  33. >'j'.  The answer is still "only sometimes", but not for the reason
  34. >given :-). Or did I miss a Date: header of "1 Apr"?
  35.  
  36. I think you missed the reference to Peter Seebach's (alternative) FAQ. It
  37. may well have been first posted on April 1st. Try the following for
  38. instance:
  39.  
  40.  
  41. 9.2:    I heard that structures could be assigned to variables and
  42.     passed to and from functions, but K&R I says not.
  43.  
  44. A:    K&R I was wrong; they hadn't actually learned C very well before
  45.     writing the book.  Later, Ritchie got a job at Bell Labs, and worked
  46.     closely with the authors of C, allowing the 2nd edition of the book
  47.     to be much more accurate.
  48.  
  49. -- 
  50. -----------------------------------------
  51. Lawrence Kirby | fred@genesis.demon.co.uk
  52. Wilts, England | 70734.126@compuserve.com
  53. -----------------------------------------
  54.